package com.istudy.dao.interfaces;

import com.istudy.entity.User;
import com.istudy.entity.UserType;
import com.istudy.utils.Page;
import pers.dzk.jdk.entity.PageBean;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {


    List<UserType> selectUserType();
    //注册
    public int insertUser(User user);
    User getUserById(int id);
    //登录
    public User selectUserByUserLoginNameAndUserPassword(User user);

    User selectUserByLoginName(User user);

    PageBean<User> select(PageBean<User> pageBean);

   //查询用户所有信息
  Integer queryCount() throws SQLException;

   //分页查询用户信息
   List<User> Getpartall(Page page) throws SQLException;

   //添加用户信息
    Integer AddUaer(User user);

    //id查询
    User UserGetById(Integer id) throws SQLException;

   //修改用户信息
     Integer  Userupdate(User user);

     //删除用户信息
    Integer deleteUser(Integer id);

    User selectByUserId(User user);

    int updateUser(User user);

    int updateUserByUserId(User user);

    int deleteUserByUserId(User user);
}